<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>bind</title>
    <script type="application/javascript">

        function fntest() {
            console.log('fntest')
            return "返回fntest";
        }

        function errtest() {
            console.log('errtest')
            let s = 1 / 0;
            throw {
                code: -1,
                msg: '类型错误'
            }
        }
        window.onload = function () {
            let doc = document.getElementById("test");

            function test(...vvv) {
                let str = doc.innerHTML;
                for (let i = 0; i < vvv.length; i++) {
                    str = str + "  " + vvv[i];
                }
                str += "<br>";
                doc.innerHTML = str;
            }
            // for (let i = 0; i < 100000; i++) {
            // let test = window.testset.testcca
            // window.testset.testfn("字符串", 333)
            //let test=ssss.asdf
            // }
            test(window.testset.testcca)
            test(window.testset.testcca)
            test(window.testset.testcca)
            test(window.testset.testcca)
            console.log(window.testset, window.testset.testcca)
            window.testset.testcca = "asdf"
            test(window.testset.testfn("字符串", 333))

            let arrBufa = new Uint8Array(window.arrBuf);
            let bufdata = "array buffer: ";
            for (let i = 0; i < arrBufa.length; i++) {
                bufdata += i + " ";
            }
            test(bufdata);
            console.log(arrBufa)
        }
    </script>
</head>
<body style="overflow: hidden;margin: 0px;padding: 0px;">
<p>
<h3>bind</h3></p>
<p id="test"></p>

</body>
</html>